package com.aube.plugin.wap;

import android.webkit.JavascriptInterface;

/**
 * Created by huyaonan on 16/9/26.
 */
public class AubeJavascriptInterface {

    public static final String NAME = "aube";

    private H5Interface mInterface;

    public AubeJavascriptInterface(H5Interface mInterface) {
        this.mInterface = mInterface;
    }

    @JavascriptInterface
    public void doShare(String title, String content, String picUrl, String url, String weiboPic, String weiboContent) {
        if(mInterface != null)
            mInterface.doNativeShare(title, content, picUrl, url, weiboPic, weiboContent);
    }

    public interface H5Interface {
        public void doNativeShare(String title, String content, String picUrl, String url, String weiboPic, String weiboContent);
    }

}
